#include <bits/stdc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define lin read<ll>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

const int N = 110;

int f[N][N][N], p, n, m, k;
int C[N][N];

int dfs(int len, int t, int v) {
	if(len < v || len + 1 < v * 2) return 0;
	if(t > m && v) return 0;
	if(t == m && v > 1) return 0;
	if(len == 0) return v == 0;
	if(~f[len][t][v]) return f[len][t][v];
	int &tot = f[len][t][v]; tot = 0; if(t == m) --v;
	rep(i, 1, len) rep(j, 0, v) tot = (tot + 1ll * dfs(i - 1, t + 1, j) * dfs(len - i, t + 1, v - j) % p * C[len - 1][i - 1] % p) % p;
	return tot;
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("1.in", "r", stdin);
#endif
	n = in, m = in, k = in, p = in;
	rep(i, 0, n) C[i][0] = 1;
	rep(i, 1, n) rep(j, 1, n) C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % p;
	memset(f, -1, sizeof f); printf("%d\n", dfs(n, 1, k));
	return 0;
}
